Integrand size = 15, antiderivative size = 67 \[ \int x^3 \cot ^2(a+i \log (x)) \, dx=-2 e^{2 i a} x^2-\frac {x^4}{4}-\frac {2 e^{6 i a}}{e^{2 i a}-x^2}-4 e^{4 i a} \log \left (e^{2 i a}-x^2\right ) \]
[Out]
Time = 0.12 (sec) , antiderivative size = 67, normalized size of antiderivative = 1.00, number of steps used = 5, number of rules used = 4, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.267, Rules used = {4592, 456, 457, 78} \[ \int x^3 \cot ^2(a+i \log (x)) \, dx=-2 e^{2 i a} x^2-\frac {2 e^{6 i a}}{-x^2+e^{2 i a}}-4 e^{4 i a} \log \left (-x^2+e^{2 i a}\right )-\frac {x^4}{4} \]
[In]
[Out]
Rule 78
Rule 456
Rule 457
Rule 4592
Rubi steps \begin{align*} \text {integral}& = \int \frac {\left (-i-\frac {i e^{2 i a}}{x^2}\right )^2 x^3}{\left (1-\frac {e^{2 i a}}{x^2}\right )^2} \, dx \\ & = \int \frac {x^3 \left (-i e^{2 i a}-i x^2\right )^2}{\left (-e^{2 i a}+x^2\right )^2} \, dx \\ & = \frac {1}{2} \text {Subst}\left (\int \frac {\left (-i e^{2 i a}-i x\right )^2 x}{\left (-e^{2 i a}+x\right )^2} \, dx,x,x^2\right ) \\ & = \frac {1}{2} \text {Subst}\left (\int \left (-4 e^{2 i a}-\frac {4 e^{6 i a}}{\left (e^{2 i a}-x\right )^2}+\frac {8 e^{4 i a}}{e^{2 i a}-x}-x\right ) \, dx,x,x^2\right ) \\ & = -2 e^{2 i a} x^2-\frac {x^4}{4}-\frac {2 e^{6 i a}}{e^{2 i a}-x^2}-4 e^{4 i a} \log \left (e^{2 i a}-x^2\right ) \\ \end{align*}
Both result and optimal contain complex but leaf count is larger than twice the leaf count of optimal. \(162\) vs. \(2(67)=134\).
Time = 0.26 (sec) , antiderivative size = 162, normalized size of antiderivative = 2.42 \[ \int x^3 \cot ^2(a+i \log (x)) \, dx=-\frac {x^4}{4}-2 x^2 \cos (2 a)+4 i \arctan \left (\frac {\cot (a)-x^2 \cot (a)}{1+x^2}\right ) \cos (4 a)-2 \cos (4 a) \log \left (1+x^4-2 x^2 \cos (2 a)\right )-2 i x^2 \sin (2 a)-4 \arctan \left (\frac {\cot (a)-x^2 \cot (a)}{1+x^2}\right ) \sin (4 a)-2 i \log \left (1+x^4-2 x^2 \cos (2 a)\right ) \sin (4 a)+\frac {2 \cos (5 a)+2 i \sin (5 a)}{\left (-1+x^2\right ) \cos (a)-i \left (1+x^2\right ) \sin (a)} \]
[In]
[Out]
Time = 1.53 (sec) , antiderivative size = 54, normalized size of antiderivative = 0.81
method | result | size |
risch | \(-\frac {9 x^{4}}{4}-\frac {2 x^{4}}{\frac {{\mathrm e}^{2 i a}}{x^{2}}-1}-4 \,{\mathrm e}^{2 i a} x^{2}-4 \,{\mathrm e}^{4 i a} \ln \left ({\mathrm e}^{2 i a}-x^{2}\right )\) | \(54\) |
[In]
[Out]
none
Time = 0.25 (sec) , antiderivative size = 70, normalized size of antiderivative = 1.04 \[ \int x^3 \cot ^2(a+i \log (x)) \, dx=-\frac {x^{6} + 7 \, x^{4} e^{\left (2 i \, a\right )} - 8 \, x^{2} e^{\left (4 i \, a\right )} + 16 \, {\left (x^{2} e^{\left (4 i \, a\right )} - e^{\left (6 i \, a\right )}\right )} \log \left (x^{2} - e^{\left (2 i \, a\right )}\right ) - 8 \, e^{\left (6 i \, a\right )}}{4 \, {\left (x^{2} - e^{\left (2 i \, a\right )}\right )}} \]
[In]
[Out]
Time = 0.17 (sec) , antiderivative size = 54, normalized size of antiderivative = 0.81 \[ \int x^3 \cot ^2(a+i \log (x)) \, dx=- \frac {x^{4}}{4} - 2 x^{2} e^{2 i a} - 4 e^{4 i a} \log {\left (x^{2} - e^{2 i a} \right )} + \frac {2 e^{6 i a}}{x^{2} - e^{2 i a}} \]
[In]
[Out]
Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 345 vs. \(2 (50) = 100\).
Time = 0.20 (sec) , antiderivative size = 345, normalized size of antiderivative = 5.15 \[ \int x^3 \cot ^2(a+i \log (x)) \, dx=-\frac {x^{6} + 7 \, x^{4} {\left (\cos \left (2 \, a\right ) + i \, \sin \left (2 \, a\right )\right )} - 8 \, {\left (2 \, {\left (-i \, \cos \left (4 \, a\right ) + \sin \left (4 \, a\right )\right )} \arctan \left (\sin \left (a\right ), x + \cos \left (a\right )\right ) + 2 \, {\left (i \, \cos \left (4 \, a\right ) - \sin \left (4 \, a\right )\right )} \arctan \left (\sin \left (a\right ), x - \cos \left (a\right )\right ) + \cos \left (4 \, a\right ) + i \, \sin \left (4 \, a\right )\right )} x^{2} - 16 \, {\left ({\left (i \, \cos \left (2 \, a\right ) - \sin \left (2 \, a\right )\right )} \cos \left (4 \, a\right ) - {\left (\cos \left (2 \, a\right ) + i \, \sin \left (2 \, a\right )\right )} \sin \left (4 \, a\right )\right )} \arctan \left (\sin \left (a\right ), x + \cos \left (a\right )\right ) - 16 \, {\left ({\left (-i \, \cos \left (2 \, a\right ) + \sin \left (2 \, a\right )\right )} \cos \left (4 \, a\right ) + {\left (\cos \left (2 \, a\right ) + i \, \sin \left (2 \, a\right )\right )} \sin \left (4 \, a\right )\right )} \arctan \left (\sin \left (a\right ), x - \cos \left (a\right )\right ) + 8 \, {\left (x^{2} {\left (\cos \left (4 \, a\right ) + i \, \sin \left (4 \, a\right )\right )} - {\left (\cos \left (2 \, a\right ) + i \, \sin \left (2 \, a\right )\right )} \cos \left (4 \, a\right ) - {\left (i \, \cos \left (2 \, a\right ) - \sin \left (2 \, a\right )\right )} \sin \left (4 \, a\right )\right )} \log \left (x^{2} + 2 \, x \cos \left (a\right ) + \cos \left (a\right )^{2} + \sin \left (a\right )^{2}\right ) + 8 \, {\left (x^{2} {\left (\cos \left (4 \, a\right ) + i \, \sin \left (4 \, a\right )\right )} - {\left (\cos \left (2 \, a\right ) + i \, \sin \left (2 \, a\right )\right )} \cos \left (4 \, a\right ) - {\left (i \, \cos \left (2 \, a\right ) - \sin \left (2 \, a\right )\right )} \sin \left (4 \, a\right )\right )} \log \left (x^{2} - 2 \, x \cos \left (a\right ) + \cos \left (a\right )^{2} + \sin \left (a\right )^{2}\right ) - 8 \, \cos \left (6 \, a\right ) - 8 i \, \sin \left (6 \, a\right )}{4 \, {\left (x^{2} - \cos \left (2 \, a\right ) - i \, \sin \left (2 \, a\right )\right )}} \]
[In]
[Out]
Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 139 vs. \(2 (50) = 100\).
Time = 0.31 (sec) , antiderivative size = 139, normalized size of antiderivative = 2.07 \[ \int x^3 \cot ^2(a+i \log (x)) \, dx=-\frac {x^{6}}{4 \, {\left (x^{2} - e^{\left (2 i \, a\right )}\right )}} - \frac {7 \, x^{4} e^{\left (2 i \, a\right )}}{4 \, {\left (x^{2} - e^{\left (2 i \, a\right )}\right )}} - \frac {4 \, x^{2} e^{\left (4 i \, a\right )} \log \left (-x^{2} + e^{\left (2 i \, a\right )}\right )}{x^{2} - e^{\left (2 i \, a\right )}} + \frac {2 \, x^{2} e^{\left (4 i \, a\right )}}{x^{2} - e^{\left (2 i \, a\right )}} + \frac {4 \, e^{\left (6 i \, a\right )} \log \left (-x^{2} + e^{\left (2 i \, a\right )}\right )}{x^{2} - e^{\left (2 i \, a\right )}} + \frac {2 \, e^{\left (6 i \, a\right )}}{x^{2} - e^{\left (2 i \, a\right )}} \]
[In]
[Out]
Time = 28.03 (sec) , antiderivative size = 55, normalized size of antiderivative = 0.82 \[ \int x^3 \cot ^2(a+i \log (x)) \, dx=-2\,x^2\,{\mathrm {e}}^{a\,2{}\mathrm {i}}-\frac {2\,{\mathrm {e}}^{a\,6{}\mathrm {i}}}{{\mathrm {e}}^{a\,2{}\mathrm {i}}-x^2}-4\,\ln \left (x^2-{\mathrm {e}}^{a\,2{}\mathrm {i}}\right )\,{\mathrm {e}}^{a\,4{}\mathrm {i}}-\frac {x^4}{4} \]
[In]
[Out]